package com.nuanshui.heatedloan.credit.pay.utils;

import com.aipg.common.AipgRsp;
import com.aipg.transquery.QTDetail;
import com.aipg.transquery.QTransRsp;
import com.allinpay.XmlTools;
import com.nuanshui.framework.lang.DateUtil;
import com.nuanshui.framework.springContext.Environment;
import com.nuanshui.framework.utils.LogUtil;
import com.nuanshui.heatedloan.credit.pay.PayRequest;
import com.nuanshui.heatedloan.credit.pay.TransRequestCode;
import com.nuanshui.heatedloan.credit.utils.Sequence;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;

import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.util.List;

public class AllinPayRspUtil {

    public static QTDetail getDetails(QTransRsp rsp) {
        QTDetail detail = null;
        if (rsp != null) {
            List<QTDetail> listDetail = rsp.getDetails();

            if (!CollectionUtils.isEmpty(listDetail)) {
                detail = listDetail.get(0);
            }
        }
        return detail;
    }

}
